<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>窗口</title>
    <link th:href="@{/css/mobile.css}" rel="stylesheet">
    <style>
    </style>
    <script type="text/javascript" th:src="@{/script/jquery-1.7.2.js}"></script>
</head>
<body>

<div th:if="${items}==null">
    <p>没有正在进行的订单</p>
</div>
<div th:id="${item.getOid()}+'_'+${item.getFid()}" th:each="item:${items}" class="right-list" style="height: 25vh;">
    <div class="right-text-box" style="font-size: calc(8px + 1.6vh)">
        <p style="margin: 0;" th:text="${item.getFname()}"></p>
        <p style="margin: 0;" th:text="'数量'+${item.getCount()}"></p>
        <p style="margin: 0;" th:text="'用户ID'+${item.getUid()}"></p>
        <p style="margin: 0;" th:text="'下单时间'+${item.getTime()}"></p>
    </div>
    <button th:onclick="cookOver([[${item.getOid()}]],[[${item.getFid()}]]);" class="btn-addToCart">出餐
    </button>

</div>
</body>
<script>
    function cookOver(oid,fid){
        document.getElementById(oid+'_'+fid).remove();
        $.getJSON("/finishItem","action=finishItem&oid="+oid+"&fid="+fid);
    }
</script>
</html>